package com.bocai.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("s")
public class initServiceController {

    /**
     * 登陆
     *
     * @return
     */
    @RequestMapping(value = "login.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView gotoLogin(ModelAndView modelAndView) {
        modelAndView.setViewName("service/login");
        return modelAndView;
    }


    /**
     * 首页
     *
     * @return
     */
    @RequestMapping(value = "home.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView gotoHome(ModelAndView modelAndView) {
        modelAndView.setViewName("service/competition-manager");
        return modelAndView;
    }

    /**
     * 会员管理
     *
     * @return
     */
    @RequestMapping(value = "user.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView gotoUserManager(ModelAndView modelAndView) {
        modelAndView.setViewName("service/user-center");
        return modelAndView;
    }

    /**
     * 充值列表
     *
     * @return
     */
    @RequestMapping(value = "userRecharge.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView gotoUserRecharge(ModelAndView modelAndView, Integer userId) {
        modelAndView.setViewName("service/user-recharge");
        modelAndView.addObject(userId);
        return modelAndView;
    }

    /**
     * 提现列表
     *
     * @return
     */
    @RequestMapping(value = "userCash.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView gotoUserCash(ModelAndView modelAndView, Integer userId) {
        modelAndView.setViewName("service/user-cash");
        modelAndView.addObject(userId);
        return modelAndView;
    }

    /**
     * 下单列表
     *
     * @return
     */
    @RequestMapping(value = "userOrder.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView gotoUserOrder(ModelAndView modelAndView, Integer userId) {
        modelAndView.setViewName("service/user-order");
        modelAndView.addObject(userId);
        return modelAndView;
    }

    /**
     * 分销明细列表
     *
     * @return
     */
    @RequestMapping(value = "salesDetails.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView getSalesDetails(ModelAndView modelAndView, Integer salesId) {
        modelAndView.setViewName("service/sales-detail");
        modelAndView.addObject(salesId);
        return modelAndView;
    }

    /**
     * 投注单管理
     *
     * @return
     */
    @RequestMapping(value = "order.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView gotoOrderManager(ModelAndView modelAndView) {
        modelAndView.setViewName("service/order-manager");
        return modelAndView;
    }

    /**
     * 资金管理
     *
     * @return
     */
    @RequestMapping(value = "money.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView gotoMoneyManager(ModelAndView modelAndView) {
        modelAndView.setViewName("service/money-manager");
        return modelAndView;
    }

    /**
     * 分销系统
     *
     * @return
     */
    @RequestMapping(value = "distribution.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView gotoDistributionManager(ModelAndView modelAndView) {
        modelAndView.setViewName("service/distribution-manager");
        return modelAndView;
    }

    /**
     * 数据配置
     *
     * @return
     */
    @RequestMapping(value = "setting.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView gotoSettingManager(ModelAndView modelAndView) {
        modelAndView.setViewName("service/setting-manager");
        return modelAndView;
    }

    /**
     * 数据配置
     *
     * @return
     */
    @RequestMapping(value = "banner.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView gotoSettingBannerManager(ModelAndView modelAndView) {
        modelAndView.setViewName("service/setting-banner");
        return modelAndView;
    }

    /**
     * 数据配置
     *
     * @return
     */
    @RequestMapping(value = "addBanner.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView gotoSettingAddBannerManager(ModelAndView modelAndView) {
        modelAndView.setViewName("service/setting-add-banner");
        return modelAndView;
    }

    /**
     * 数据配置
     *
     * @return
     */
    @RequestMapping(value = "messageInfo.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView gotoSettingMessageInfoManager(ModelAndView modelAndView) {
        modelAndView.setViewName("service/setting-messageInfo");
        return modelAndView;
    }

    /**
     * 标签管理
     *
     * @return
     */
    @RequestMapping(value = "tab-manager.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView gotoTabManager(ModelAndView modelAndView) {
        modelAndView.setViewName("service/tab-manager");
        return modelAndView;
    }

    /**
     * 比赛管理
     *
     * @return
     */
    @RequestMapping(value = "event-manager.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView gotoEventManager(ModelAndView modelAndView) {
        modelAndView.setViewName("service/event-manager");
        return modelAndView;
    }

    /**
     * 市场管理
     *
     * @return
     */
    @RequestMapping(value = "market-manager.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView gotoMarketManager(ModelAndView modelAndView, Integer eventId) {
        modelAndView.setViewName("service/market-manager");
        modelAndView.addObject(eventId);
        return modelAndView;
    }

    /**
     * 投注统计
     *
     * @return
     */
    @RequestMapping(value = "market-count.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView gotoMarketCount(ModelAndView modelAndView, Integer eventId, Integer ruleType) {
        modelAndView.setViewName("service/market-count");
        modelAndView.addObject(eventId);
        modelAndView.addObject(ruleType);
        return modelAndView;
    }

    /**
     * 投注明细
     *
     * @return
     */
    @RequestMapping(value = "market-detail.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView gotoMarketDetail(ModelAndView modelAndView, Integer eventId, Integer ruleType, Integer selectionId) {
        modelAndView.setViewName("service/market-detail");
        modelAndView.addObject(eventId);
        modelAndView.addObject(ruleType);
        modelAndView.addObject(selectionId);
        return modelAndView;
    }

    /**
     * 分销商佣金提现
     *
     * @return
     */
    @RequestMapping(value = "sales-withdraw.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView gotoSalesWithdraw(ModelAndView modelAndView) {
        modelAndView.setViewName("service/sales-withdraw");
        return modelAndView;
    }

    /**
     * 新增二级分销商
     *
     * @return
     */
    @RequestMapping(value = "sales-add.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView gotoSalesAdd(ModelAndView modelAndView) {
        modelAndView.setViewName("service/sales-add");
        return modelAndView;
    }


    /**
     * 二级分销商详情
     *
     * @return
     */
    @RequestMapping(value = "distribution-details.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView distributionDetails(ModelAndView modelAndView, Integer salesId) {
        modelAndView.setViewName("service/distribution-details-manager");
        modelAndView.addObject(salesId);
        return modelAndView;
    }

    /**
     * 分销商提现列表
     *
     * @return
     */
    @RequestMapping(value = "reseller-list.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView resellerList(ModelAndView modelAndView, Integer salesId) {
        modelAndView.setViewName("service/reseller-list-manager");
        modelAndView.addObject(salesId);
        return modelAndView;
    }

    /**
     * 会员充值列表
     *
     * @return
     */
    @RequestMapping(value = "recharge-list.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView rechargeList(ModelAndView modelAndView, Integer userId) {
        modelAndView.setViewName("service/recharge-list-manager");
        modelAndView.addObject(userId);
        return modelAndView;
    }
}
